package cc.linker.steplink.crm.merchant.dao.integral;

import cc.linker.steplink.crm.merchant.pojo.GoodsSpec;
import cc.linker.steplink.crm.merchant.pojo.integral.IntegralGoodsPo;
import cc.linker.steplink.crm.merchant.pojo.integral.IntegralGoodsSpec;
import cc.linker.steplink.crm.merchant.pojo.integral.IntegralSku;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface IntegralGoodsDao {

    List<Map> getGoodsList(Map<String, Object> params);

    List<Map> getGoodsListByAdminId(Map<String, Object> params);

    IntegralGoodsPo getGoodsBySort(Map<String, Object> param);

    void updateSort(@Param("goodsId") Long goodsId,@Param("sort") Integer sort);

    void delete(@Param("goodsId") Long goodsId);

    Map getrule(@Param("orgId") String orgId,@Param("ruleType") Integer ruleType);

    void insertrule(Map map);

    void updaterule(Map<String, Object> param);

    void updateStatus(Map<String, Object> param);

    void updateOrgStatus(Map<String, Object> param);

    void updateGoods(Map<String, Object> params);

    void deleteGoodsSpecs(@Param("goodsId") Long goodsId);

    void insertGoods(Map<String, Object> params);

    void insertGoodsByAdminId(Map<String, Object> params);

    void addAllGoodsSort(@Param("goodsId") Long goodsId,@Param("orgId") String orgId);

    void insertGoodsSpec(Map<String, Object> map);

    void insertSku(Map<String, Object> map);

    void delSkuBySkuIds(@Param("skuIds") List<Long> skuIds,@Param("goodsId") Long goodsId);

    void deleteSkus(@Param("goodsId") Long goodsId);

    IntegralGoodsPo getGoodsInfo(@Param("goodsId") Long goodsId);

    List<IntegralGoodsSpec> getSpecByGoodsId(Long goodsId);

    List<IntegralSku> getSkuByGoodsId(Long goodsId);

    List<Map<String, Object>> exchangelist(Map<String, Object> params);

    List<Long> getIntegralGoodsId(@Param("goodsId") Long goodsId);

    Long getSkuCount(@Param("skuId") Long skuId);

    Long getOriginalGoodsCount(@Param("goodsId") Long goodsId);

    Integer getOriginalGoods(@Param("goodsId") Long originalGoodsId);

    void updateIntegralGoods(Map<String, Object> params);

    Integer getOriginalVip(@Param("goodsId") Long originalGoodsId);

    String getQuotaVipNames(@Param("quotaVips") String quotaVips);

    List<Map> getQuotaVipList(@Param("quotaVips") String quotaVips);

    /**
     * 联盟商城积分商品列表
     */
    List<Map<String, Object>> allianceShareList(Map<String, Object> params);

    List<Map<String, Object>> getMyShareGoodsList(Map<String, Object> param);

    Integer saveSharing(Map<String, Object> param);

    /**
     * 添加/移除至(从)商城
     */
    void addToMallByGoodsId(Map<String, Object> params);

    Integer getListIntGoodsCustomCount(Map<String, Object> paramCustom);

    List<Map<String, Object>> getListIntGoodsCustom(Map<String, Object> paramCustom);
}
